import threading
from  fanyi.punctuation1 import removePunctuation
from fanyi import baidu,google,youdao
def main(text):
    rest=[]
    #三个线程
    if not text:
        return
    #谷歌
    t1=threading.Thread(target=google.Google().run,args=(text,rest))
    # 有道
    t3=threading.Thread(target=youdao.YouDao.main, args=(text,rest))
    #百度
    t2=threading.Thread(target=baidu.Baidu.main, args=(text,rest))
    t1.start()
    t2.start()
    t3.start()
    t1.join()
    t2.join()
    t3.join()
    lsts=[]
    for text in rest:
        lsts.append(removePunctuation(text))
    results=list(set(lsts))
    return results

